$NG.AllReady(function (page, { useAction, useBeforeClick, useValuesChange, useClick, useUpdateRow, subscribe, useUpdateRows }) {
    const mstform = $NG.getCmpApi("p_form_ndmzcpkh_m")
    const dgrid1 = $NG.getCmpApi("")
    const getHeadValue = (str)=>mstform.getItem(str).getValue()

    useValuesChange(()=>{
        getIndByUserInfy()
    },"p_form_ndmzcpkh_m.u_xm")

    async function getIndByUserInfy(){
        const phid = getHeadValue("u_xm")
        if(!phid) return 
        const res = await $NG.execServer("getIndByUserInfy",{phid})
        if(res.count == 0) return 
        const datas = JSON.parse(res.data)[0].extendObjects
        $NG.updateState((updater)=>{
            updater.data.p_form_ndmzcpkh_m.setProps({
                u_csny:datas.u_csny,
                u_zw:datas.u_zw,
                u_rzsj:datas.u_rzsj,
                u_xl:{
                    label:datas.xl_name,
                    value:datas.xl_phid
                },
                u_zc:{
                    label:datas.zc_name,
                    value:datas.zc_phid
                },
                u_gzdw:{
                    label:datas.szdw_name,
                    value:datas.szdw_phid
                }
            })
        })
    }
})